<cfset navID = 25>
<cfparam name="showPrintable" default="0">
<cfparam name="orderBy" default="date">
<cfparam name="page" default="1">
<cfparam name="viewAll" default="0">
<cfparam name="searchType" type="string" default="">							
<cfparam name="zipCode" type="string" default="">
<cfparam name="zipCodeRadiusInMiles" type="integer" default="50">
<cfparam name="city" type="string" default="">
<cfparam name="county" type="string" default="">
<cfparam name="startRow" type="integer" default="1">
<cfparam name="alertMessage" type="string" default="">

<cfset ITEMS_PER_PAGE = 10>


<cf_JelCMS_Menu	navId = "#navId#"
					datasourcename = "#datasourcename#">
<cf_JelCMS_Header	navId = "#navId#"
					datasourcename = "#datasourcename#"
					directoryPathToTemplates = "#directoryPathToTemplates#">		
<cf_JelCMS_Footer	navId = "#navId#"
					datasourcename = "#datasourcename#"
					directoryPathToTemplates = "#directoryPathToTemplates#">


<cfscript>
	inWorkshops = false;
	currentParentId = listFirst(parentIdList);
	if (listLen(parentIdList) gt 1) {
		currentParentId = listGetAt(parentIdList, 2);
		if (currentParentId eq 5) {
			inWorkshops = true;
		}
	}
</cfscript>

<cfif Len(Trim(zipCode)) gt 0>
	<cfset searchType = "zipCode">
<cfelseif Len(Trim(city)) gt 0>
	<cfset searchType = "city">
<cfelseif Len(Trim(county)) gt 0>
	<cfset searchType = "county">
<cfelse>
	<cfset searchType = "">
</cfif>

<cfif searchType eq "zipCode" or searchType eq "city" or searchType eq "county">

	<cfobject component="applications.admin.Components.WorkshopGateway" name="workshopGateway">
	<cfset workshops = workshopGateway.searchWorkshops(county, city, zipCode, zipCodeRadiusInMiles)>
	
</cfif>

<cfif viewAll>
	<cfset page = 1>
</cfif>

<cfquery name="GetCities" datasource="wms">
	select distinct site.city
	from workshop left outer join site on workshop.Site_ID = site.Site_ID
	where workshop.Approved = 1
	and workshop.Deleted = 0
	order by city
</cfquery>

<cfquery name="GetCounties" datasource="wms">
	select distinct county.county
	from workshop left outer join site on workshop.Site_ID = site.Site_ID
	left outer join county on county.County_ID = site.County_ID
	where workshop.Approved = 1
	and workshop.Deleted = 0
	order by county
</cfquery>

<cfoutput>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
	<html>
	<head>
		<title>Grant Money for College, Grants for College Students, College Grant</title>
		<link rel="stylesheet" href="/common/styles.css">
		<link rel="stylesheet" href="#urlPathToStyleSheet#">
		<script language="javascript" src="/common/scripts.js"></script>
		
		<script language="JavaScript" src="/common/dhtml.js"></script>
		<link href="/common/dhtml.css" rel="stylesheet">
		
		<cfif inWorkshops>
			<link rel="stylesheet" href="/common/workshops.css">
		</cfif>

		<meta name="description" content="Search for the college that best fits you and the student loans to pay for it.  Find your Grant Money for College, grants for college students, college grant at Calgrants.org today.">
		<meta name="keywords" content="grant money for college, grants for college students, college grant, free money for college, student grants">

	</head>
	<cfparam name="onloadProcs" default="">
	<body onLoad="doLoadProc();#onloadProcs#">
		<div id="hideDhtml" onMouseOver="hideLayer('hideDhtml'); delayedNavHide();">
			<a href="javascript:void(0);" onMouseOver="hideLayer('hideDhtml'); delayedNavHide();"><img src="/common/images/spacer.gif" width="99%" height="99%" border="0" alt="" galleryimg="no"></a>
		</div>

		<div class="main">
			<table border="0" cellpadding="0" cellspacing="0" class="mainTable">
				<tr valign="top">
					<td class="contentColumn">
						<cfif not showPrintable>
							<cfif Len(header.fileName) gt 0>
								<cfinclude template="#CFMapping_Root#/templates/#header.fileName#">
							</cfif>
						</cfif>

				
						<div class="contentContainer">
							<table border="0" cellpadding="0" cellspacing="0">
								<tr valign="top">
									<td class="subnav">
										<cfinclude template="/common/subnav.cfm">
										<p><br />
										<a href="http://www.facebook.com/Cash.for.College.California/" target="_blank"><img height="68" alt="Find us on Facebook" src="/common/images/facebook-badge.jpg" width="168" border="0" /></a><a href="http://www.facebook.com/Cash.for.College.California" target="_blank"></a></p>
										<img src="/common/images/spacer.gif" width="184" height="1" alt="" border="0"><br>
									</td>
									<td class="content">
							
							<p class="pageTitle"><b><img title="Cash for College is here for you." height="72" alt="Cash for College is here for you." src="../common/images/workshops-subbar.gif" width="543" border="0"></b></p>
							<p class="pageTitle">Find a Workshop</p>							

							<p>California Cash for College Workshops are held in January and February of every year, up until the Cal Grant March 2 deadline.</p>
							
							<p>It's easy &mdash; just type in your zip code or your city and any Cash for College workshop scheduled in your area will be listed for you. Remember, you don't have to attend the workshop for the entire time listed. It only takes about an hour, or less, to go through the workshop, and you could cash in on extra scholarships! Here's what to bring.</p>
							
							<p>If you don't see a workshop location in your area, check back in to this site as workshops are added continuously.</p>


							<p class="header">Workshop Search</p>							
</cfoutput>
							
<table border="0" cellpadding="6" cellspacing="0">
	<tr>
		<td colspan="2"><b>Enter your zip code</b><br></td>
		<td colspan="2"><b>Search by city</b><br></td>
		<td><b>Search by county</b><br></td>
	</tr>
	<tr>
		<cfform action="#script_name#" method="post">
			<input type="hidden" name="navId" value="<cfoutput>#navId#</cfoutput>">
			<td><cfinput type="text" name="zipCode" message="Zip code is required and must be a valid 5 digit zip code" validate="zipcode" required="yes" class="formField" value="" size="10" maxlength="5">&nbsp;<input type="image" align="absmiddle" src="/common/images/workshops-search-button.gif" width="42" height="18" alt="" border="0"><br></td>
		</cfform>
		<td>-or-</td>
		<cfform action="#script_name#" method="post">
			<input type="hidden" name="navId" value="<cfoutput>#navId#</cfoutput>">
			<td>
			<cfselect name="city" required="yes" message="Select a city" onChange="form.submit(); return true;" class="formField">
				<option value="invalid-selection">select a city</option>
				<cfoutput query="GetCities">
					<option value="#city#">#city#</option>
				</cfoutput>
			</cfselect>
			</td>
		</cfform>
		<td>-or-</td>
		<cfform action="#script_name#" method="post">
			<input type="hidden" name="navId" value="<cfoutput>#navId#</cfoutput>">
			<td>
			<cfselect name="county" required="yes" message="Select a county" onChange="form.submit(); return true;" class="formField">
				<option value="invalid-selection">select a county</option>
				<cfoutput query="GetCounties">
					<option value="#county#">#county#</option>
				</cfoutput>
			</cfselect>
			</td>
		</cfform>
</table>
<span class="horizontalRule"><img title="" height="1" alt="" src="/common/images/spacer.gif" width="1" border="0"></span> 

<cfif searchType eq "zipCode" or searchType eq "city" or searchType eq "county">

	<cfif workshops.RecordCount gt 0>
	
		<cfoutput>
		<cfset startRow = evaluate(((page - 1) * ITEMS_PER_PAGE) + 1)>
		<cfset endRow = startRow + (ITEMS_PER_PAGE - 1)>
		<cfif endRow gt workshops.RecordCount>
			<cfset endRow = workshops.RecordCount>
		</cfif>
		<cfif viewAll>
			<cfset endRow = workshops.RecordCount>
		</cfif>
		<strong>You searched with</strong> <cfif searchType eq "zipCode"><strong>zip code &quot;#zipCode#&quot;</strong> (limited to a 50 mile radius)<cfelseif searchType eq "city"><strong>city &quot;#city#&quot;</strong><cfelseif searchType eq "county"><strong>county &quot;#county#&quot;</strong></cfif><br>
		Results #startRow# - #endRow# of #workshops.RecordCount#	
		</cfoutput>
	
		<cfoutput>
			<cfset count=0>
			<div class="pagination">&nbsp;
				<cfif workshops.recordCount gt ITEMS_PER_PAGE or ViewAll>
					<cfset pages = ceiling(workshops.recordCount / ITEMS_PER_PAGE)>
					<cfif page gt 1 and not viewAll>
						<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&orderBy=#orderBy#&page=#evaluate(page - 1)#" class="pageArrow">&lt;</a>&nbsp;
					</cfif>
					<cfloop index="i" from="1" to="#pages#">
						<cfif i is page and not viewAll>
							<span class="currentPage">#i#</span>
						<cfelse>
							<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&orderBy=#orderBy#&page=#i#">#i#</a> 
						</cfif><cfif i neq pages> |</cfif>
					</cfloop>
					<cfif page lt pages and not viewAll>
						&nbsp;<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&orderBy=#orderBy#&page=#evaluate(page + 1)#" class="pageArrow">&gt;</a>
					</cfif>
					<img src="/common/images/dots-v.gif" width="1" height="15" alt="" border="0" align="absmiddle" hspace="3">
					<cfif not viewAll>
						<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&orderBy=#orderBy#&viewAll=1">View All</a>
					<cfelse>
						<span class="currentPage">View All</span>
					</cfif>
				</cfif>
			</div>
		</cfoutput>
	
		<table width="100%" border="0" cellspacing="2" cellpadding="0">
			<cfoutput>
			<tr class="tableHeaderRow">
				<td>
					<!--- <cfif orderBy neq "date">
						<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&viewAll=#viewAll#&orderBy=date">Date &amp; Time</a>
					<cfelse> --->
						Date &amp; Time<br>
					<!--- </cfif> --->
				</td>
				<td>
					<!--- <cfif orderBy neq "location">
						<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&viewAll=#viewAll#&orderBy=location">Location</a>
					<cfelse> --->
						Location<br>
					<!--- </cfif> --->
				</td>
				<td>
					<!--- <cfif orderBy neq "contact">
						<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&viewAll=#viewAll#&orderBy=contact">Contact</a>
					<cfelse> --->
						Contact<br>
					<!--- </cfif> --->
				</td>
				<cfif searchType eq "zipCode">
					<td>
						<!--- <cfif orderBy neq "distance">
							<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&viewAll=#viewAll#&orderBy=distance">Distance</a>
						<cfelse> --->
							Distance<br>
						<!--- </cfif> --->
					</td>
				</cfif>
			</tr>
			</cfoutput>
		<cfoutput query="workshops" startrow="#startRow#" maxrows="#endRow#">
			<cfset mapAddress = "#Address# #City# CA #Zip_Code#">
			<cfset mapAddress = URLEncodedFormat(mapAddress)>
			<tr<cfif CurrentRow mod 2 eq 0> class="evenRow"<cfelse> class="oddRow"</cfif>>
				<td valign="top">
				<b>#DateFormat(Workshop_Date, 'm/d/yy')#</b><br>
				#TimeFormat(Start_Time, 'h:mm tt')# -<br>
				#TimeFormat(End_Time, 'h:mm tt')#<br>
				</td>
				<td valign="top">
				<b>#Site#</b><br>
				#Address#<br>
				#City#, CA #Zip_Code#<br>
				<!--- <a href="http://www.mapquest.com/maps/map.adp?formtype=address&country=US&popflag=0&latitude=&longitude=&name=&phone=&level=&addtohistory=&cat=&address=#Address#&city=#City#&state=CA&zipcode=#Zip_Code#" target="_blank">Get Directions</a><br> --->
				<a href="http://maps.google.com/maps?q=#mapAddress#&hl=en" target="_blank">Get Directions</a><br>
				<!--- http://maps.google.com/maps?q=#mapAddress#&hl=en --->
				</td>
				<td valign="top">
				#First_Name# #Last_Name#<br>
				#Phone#<cfif Len(Trim(Extension)) gt 0> x #Extension#</cfif><br>
				<a href="mailto:#Email#">#Email#</a><br>			
				</td>
				<cfif searchType eq "zipCode">
					<cfif Zip_Code eq zipCode>
					<td valign="top">
					0 mi.<br>
					</td>
					<cfelse>
					<td valign="top">
					#DecimalFormat(distance)# mi.<br>
					</td>
					</cfif>
				</cfif>
			</tr>
		</cfoutput>
		</table>
		<cfoutput>
			<cfset count=0>
			<div class="pagination">&nbsp;
				<cfif workshops.recordCount gt ITEMS_PER_PAGE or ViewAll>
					<cfset pages = ceiling(workshops.recordCount / ITEMS_PER_PAGE)>
					<cfif page gt 1 and not viewAll>
						<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&orderBy=#orderBy#&page=#evaluate(page - 1)#" class="pageArrow">&lt;</a>&nbsp;
					</cfif>
					<cfloop index="i" from="1" to="#pages#">
						<cfif i is page and not viewAll>
							<span class="currentPage">#i#</span>
						<cfelse>
							<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&orderBy=#orderBy#&page=#i#">#i#</a> 
						</cfif><cfif i neq pages> |</cfif>
					</cfloop>
					<cfif page lt pages and not viewAll>
						&nbsp;<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&orderBy=#orderBy#&page=#evaluate(page + 1)#" class="pageArrow">&gt;</a>
					</cfif>
					<img src="/common/images/dots-v.gif" width="1" height="15" alt="" border="0" align="absmiddle" hspace="3">
					<cfif not viewAll>
						<a href="#script_name#?navId=#navId#&zipCode=#zipCode#&city=#city#&county=#county#&orderBy=#orderBy#&viewAll=1">View All</a>
					<cfelse>
						<span class="currentPage">View All</span>
					</cfif>
				</cfif>
			</div>
		</cfoutput>
		
	<cfelse>
	
		<p>There are no workshops with the selected criteria.</p>
		
	</cfif>

<cfelse>
	
	<cfoutput>
	<cfif Len(Trim(alertMessage)) gt 0>
	<p><strong>#alertMessage#</strong></p>
	</cfif>
	<p>Search by zip code, city or county above.</p>
	<br>
	</cfoutput>

</cfif>
<cfoutput>
									</td>
								</tr>
							</table>
						</div>

						<img src="/common/images/spacer.gif" width="744" height="1" alt="" border="0"><br>
				
						<cfif not showPrintable>
							<cfif Len(footer.fileName) gt 0>
								<cfinclude template="#CFMapping_Root#/templates/#footer.fileName#">
							</cfif>
						</cfif>
					</td>
					<td class="extraColumn">
						<img src="/common/images/bg/ds-corner.gif" width="11" height="14" alt="" border="0"><br>
					</td>
				</tr>
			</table>
		</div>
		
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-1152673-1";
urchinTracker();
</script>

	</body>
	</html>
</cfoutput>